File
: { "fileLocation": {
"WFFileLocationType": "iCloud",
"fileProviderDomainID": "com.apple.CloudDocs.iCloudDriveFileProvider/FCB1C390-2B1D-417F-97E7-684FBE5F6063",
"relativeSubpath": "iCloud~md~obsidian/Documents/Second-Brain/Deep-Work-Machine",
"appContainerBundleIdentifier": "md.obsidian",
"crossDeviceItemID": "docs.icloud.com:com.apple.CloudDocs/E948A19A-7823-4571-A9D4-A8C0AAA81727/8c724919baf05ad02235de630bc4d69607a0cb6a"
},
"filename": "Deep-Work-Machine",
"displayName": "Deep-Work-Machine"
}
[Number of Flows,
Number of Words]
3 Adjust Subtract Date [CurrentDate] » 4 6 10 14 70
4 Create Folder /[Repeat Item] /[3 Adjusted Date {"Date Style":"Custom","WFDateFormat":"yyyy/MM-MMMM","WFISO8601IncludeTime":false}] » 12 16 23
Folder
: [0 Deep-Work-Machine]
5 Run Shortcut Get Mardkown Heading Anchor Text »
Workflow
: { "workflowIdentifier": "6D49EA2A-0E94-4DFA-9FE5-DD6ABA97B368",
"workflowName": "Get Mardkown Heading Anchor Text",
"isSelf": false
}
6 Text »
[5 Shortcut Result] _[3 Adjusted Date {"Date Style":"Custom","WFDateFormat":"yyyy-MM","WFISO8601IncludeTime":false}]
7 Set Variable filename to [6 Text]
8 Comment
9 Text »
10 Run Shortcut [9 Text] ➔ Chart Image »
11 Set Name of [10 Chart Image] to [filename] .png »
DontIncludeFileExtension
: true
12 Save File [11 Renamed Item]
Folder
: [4 Created Folder]
13 Comment
14 DataJar > GetValueIntent ➔ CSV » 15 18
keyPath
: Deep Work Machine.[Repeat Item] .[3 Adjusted Date {"Date Style":"Custom","WFDateFormat":"yyyy.MMMM","WFISO8601IncludeTime":false}]
15 Set Name of [14 CSV] to [filename] .csv »
DontIncludeFileExtension
: true
16 Save File [15 Renamed Item]
Folder
: [4 Created Folder]
17 Comment
18 Actions > ParseCSVIntent »
19 Set Dictionary Value for data to [18 Parsed CSV] in »
20 Replace Text "data":(\{.*?\}) with "data":[$1] in [19 Dictionary] »
ReplaceTextRegularExpression
: true
21 Run Shortcut Pretty Print Dictionary ➔ prettyPrintedDict »
Workflow
: { "workflowIdentifier": "0F135E84-71A6-46BF-BC50-10FC69B847A2",
"workflowName": "Pretty Print Dictionary",
"isSelf": false
}
22 Set Name of [21 prettyPrintedDict] to [filename] .json »
DontIncludeFileExtension
: true
23 Save File [22 Renamed Item]
Folder
: [4 Created Folder]
24 Get File at Path [Repeat Item] from Folder »
File
: [0 Deep-Work-Machine]
25 Get Contents of Folder » 26 58
26 Filter Files [25 Get Contents of Folder] » 27 28
ContentItemFilter
: File Extension is png
27 Count Items in [26 Files] » 47 54
28 Repeat[2] with Each in [26 Files]
29 Match Text [Repeat Item] /(.+) in [Repeat Item 2 ’s File Path] »
30 Get Match Group At Index 1 in [29 Matches] »
31 Split Text [30 Text] by Custom » 32 42
32 Get First Item from List [31 Split Text] ➔ yearFolder » 33 35 38 39 43 44
33 Match Text (?m)^[32 yearFolder] $ in [yearList] »
34 If [33 Matches] does not have any value
ConditionalActionString
: [Repeat Item ’s Folder]
35 Add [32 yearFolder] to Variable yearList
36 Combine Text [perYearMarkdownContent] with New Lines »
37 Add [36 Combined Text] to Variable myMarkdownContent
38 URL Encode ./[Repeat Item] /[32 yearFolder] »
39 Text »
<summary>
<strong>
<a href="[38 URL Encoded Text] ">[32 yearFolder] </a>
</strong>
</summary>
40 Set Variable perYearMarkdownContent to [39 Text]
41 End If ▵34
42 Get Item At Index 2 from List [31 Split Text] ➔ monthFolder » 43 44 45
43 URL Encode ./[Repeat Item] /[32 yearFolder] /[42 monthFolder] » 45
44 URL Encode ./[Repeat Item] /[32 yearFolder] /[42 monthFolder] /[Repeat Item 2] .png »
45 Text »
- <details>
<summary>
<a href="[43 URL Encoded Text] ">[42 monthFolder] </a>
</summary>
<a href="[44 URL Encoded Text] ">
<kbd>
<img src="[44 URL Encoded Text] " width="400" title="🖱️ Click me to view an interactive chart!"/>
</kbd>
</a>
</details>
46 Add [45 Text] to Variable perYearMarkdownContent
47 If [Repeat Index 2] is [27 Count]
48 Combine Text [perYearMarkdownContent] with New Lines »
49 Add [48 Combined Text] to Variable myMarkdownContent
50 End If
51 End Repeat[2] with Each ▵28
52 Text »
53 Combine Text [myMarkdownContent] with Custom »
TextCustomSeparator
: [52 Text]
54 Text » 70
<details>
<summary>
<strong>
<a href="./[Repeat Item] ">All stats over [27 Count] months</a>
</strong>
</summary>
- <details>
[53 Combined Text]
</details>
</details>
55 Set Variable yearList to
56 Set Variable perYearMarkdownContent to
57 Set Variable myMarkdownContent to
58 Filter Files [25 Get Contents of Folder] » 59 60
ContentItemFilter
: File Extension is csv
59 Count Items in [58 Files] » 70
60 Repeat[2] with Each in [58 Files]
61 Actions > ParseCSVIntent » 62 65
62 Count Items in [61 Parsed CSV] »
63 Calculate [62 Count] + [dayCount] »
64 Set Variable dayCount to [63 Calculation Result]
65 Get Last Item from List [61 Parsed CSV] »
66 Get Dictionary Value for Accumulated in [65 Item from List] »
67 Calculate [66 Dictionary Value] + [accumulated] »
68 Set Variable accumulated to [67 Calculation Result]
69 End Repeat[2] with Each ▵60
70 Dictionary »
{ "outlineText": "[54 Text] ",
"accumulated": "[accumulated] ",
"dayCount": "[dayCount] ",
"monthCount": "[59 Count] ",
"pngFile": "./[Repeat Item] /[3 Adjusted Date {\"Date Style\":\"Custom\",\"WFDateFormat\":\"yyyy/MM-MMMM\",\"WFISO8601IncludeTime\":false}] /[filename] .png" }
71 Set Dictionary Value for [Repeat Item] to [70 Dictionary] in [dict] »
72 Set Variable dict to [71 Dictionary]
73 Set Variable accumulated to
| | All Time | Monthly Average | Weekly Average | Daily Average |
| :---: | :---: | :---: | :---: | :---: |
| **Number of Flows** | 🍅 × [76 Formatted Number] <br>≈ [78 Formatted Number] minutes<br>≈ [80 Formatted Number] hours | 🍅 × [82 Formatted Number] <br>≈ [84 Formatted Number] minutes<br>≈ [86 Formatted Number] hours | 🍅 × [94 Formatted Number] <br>≈ [96 Formatted Number] minutes<br>≈ [98 Formatted Number] hours | 🍅 × [88 Formatted Number] <br>≈ [90 Formatted Number] minutes<br>≈ [92 Formatted Number] hours |
| **Number of Words** | [100 Formatted Number] words | [102 Formatted Number] words | [106 Formatted Number] words | [104 Formatted Number] words |
# Deep Work Machine
> **Last Update:** [CurrentDate {"WFISO8601IncludeTime":false,"Date Style":"ISO 8601"}] \u{space}\u{space}
<div align="center">
[112 If Result]
</div>
## About
binaural beats
## Stats
### Last Month
|  |  |
| :-: | :-: |
### All Time
#### Number of Flows
daily focus sessions
[75 Number of Flows as Dictionary.outlineText]
#### Number of Words
daily writing sessions
[99 Number of Words as Dictionary.outlineText]